package com.veo.dao.impl;

import com.veo.entity.PageBean;
import com.veo.entity.User;
import com.veo.service.UserService;
import com.veo.service.impl.UserServiceImpl;

public class dao {
    public static void main(String[] args) {
// 测试1       List<User> User=new UserDaoImpl().findAll();
//        for(User u:User){
//            System.out.println(u.getId());
//            System.out.println(u.getName());
//        }
        //测试2
//        User user1=new User();
//        user1.setUsername("张三");
//        user1.setPassword("123456");
//        cn.itcast.domain.User login = new UserDaoImpl().login(user1.getUsername(), user1.getPassword());
//        if(login!=null){
//            System.out.println(user1.getUsername());
//            System.out.println(user1.getPassword());
//
//        }else {
//            System.out.println("null");
//        }

        //测试3
//        UserDao dao=new UserDaoImpl();
//        int totalPage=dao.findTotalCount();
//        System.out.println(totalPage);
//        List<User> pb=dao.findByPage(0,5);
//        System.out.println(pb);
        //测试4
        UserService service=new UserServiceImpl();
        PageBean<User> userbyPage = service.findUserbyPage("1", "5", null);
        System.out.println(userbyPage);


    }
}
